package com.pcafs.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pcafs.common.core.domain.entity.PcafsDatabase;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 财务数据仓Mapper接口
 *
 * @author pcafs
 * @date 2022-05-02
 */
public interface PcafsDatabaseMapper extends BaseMapper<PcafsDatabase> {

    /**
     * 创建表
     * @Author hyh
     * @Date 15:06 2022/5/5
     * @param sqlStr:
     **/
    void createTab(@Param("sqlStr") String sqlStr);

    /**
     * 删除表
     * @param tabName
     * @return
     */
    int dropTable(@Param("tabName") String tabName);

    @Select("select count(*) from pcafs_database where tab_name = #{tabName}")
    Integer getByName(@Param("tabName")String tabName);
}
